<?php
/**
 * Created by PhpStorm.
 * User: SnGef
 * Date: 2017/6/26
 * Time: 22:58
 */
global $_W, $_GPC;

$device_id = empty($_GPC['device_id']) ? "" : $_GPC['device_id'];
$isAdd='0';
$deviceInfo=[];


if(empty($device_id)) {
    $isAdd='1';
    //新增
}else
{
    //修改编辑
    $deviceInfo = pdo_fetchall("SELECT * FROM " . tablename('xd_device') . " WHERE  id = :device_id " ,
        array(
        ':device_id' => "{$device_id}"
        )
    );
}

//echo $device_id.'<br/>';
//print_r($deviceInfo);
//exit;
include $this->template('device_edit');

